<template>
  <div id="app">
    <template v-if="route.path.startsWith('/user')">
      <router-view />
    </template>
    <template v-else>
      <BasicLayout />
    </template>
  </div>
</template>

<style scoped></style>

<script lang="ts" setup>
// 导入基础布局
import BasicLayout from "@/layouts/BasicLayout.vue";
import { useRoute, useRouter } from "vue-router";
import { onMounted } from "vue";

const router = useRouter();

const route = useRoute();

/**
 * 全局初始化函数，有全局单次调用的代码，可以写在这里
 */
const doInit = () => {
  // console.log("Hello 欢迎来到啊炎同学的星球~");
};

onMounted(() => {
  doInit();
});
</script>